<!DOCTYPE html>
<style>
  body {
    height: 200vh;
    position: relative;
  }
  div {
    position: absolute;
    top: 100px;
    background-color: green;
    width: 100px;
    height: 100px;
  }
</style>
<div></div>
<script>
  window.scrollTo(0, 100);
</script>
